﻿using System;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AnyOffice.Components;
using AnyOffice.DAL;
using log4net;
using System.Reflection;
namespace AnyOffice.general.mytable
{
    public partial class calendar : System.Web.UI.UserControl
    {
        private static ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);




        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                SqlConnection conn = new SqlConnection(ConfigManager.ConnectionString);
                DataTable table = new CalendarDao().Today(conn, HttpContext.Current.User.Identity.Name);
                if (table.Rows.Count > 0)
                {
                    this.rptCalendar.DataSource = table;
                    this.rptCalendar.DataBind();
                }
                else
                {
                    this.litCalendar.Text = "·暂无日程安排";
                }
                conn.Close();
            }
            catch (Exception exception)
            {
                if (log.IsErrorEnabled)
                {
                    log.Error("", exception);
                }
            }
        }
       

    }
}